import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase="DBshop038_添加客户组"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,"客户管理","管理客户组")
firefox.find_element_by_link_text("添加客户组").click()
firefox.find_element_by_id("user_group_name").send_keys("博为峰")
firefox.find_element_by_id("integral_num_start").send_keys("1000")
firefox.find_element_by_id("integral_num_end").send_keys("20000")
firefox.find_element_by_name("integral_num_state").click()
firefox.find_element_by_xpath("//button").click()

try:
    firefox.find_element_by_xpath("//td[text()='博为峰']")
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)